<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>

<html>
    <head>
    <%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<base href="<%=basePath%>">
        <%@include file="/WEB-INF/jspf/head.jspf" %>
        <script src="<%=request.getContextPath()%>/portal_1/js/newHouse.js"></script>
        <link rel="stylesheet" type="text/css" href="<%=request.getContextPath() %>/portal_1/css/newHouse.css"/> 
    
    <script src="http://www.google.com/jsapi?key=ABQIAAAAuPsJpk3MBtDpJ4G8cqBnjRRaGTYH6UMl8mADNa0YKuWNNa8VNxQCzVBXTx2DYyXGsTOxpWhvIG7Djw" type="text/javascript"></script>
    <script type="text/javascript">
      var ge;
    var la;
  var latitude;
  var longitude;
  var heading;
  var buildings=false;
  var turning;
  var frameendEL=false;
  var kmzs;
  var nls;
    google.load("earth", "1");
    
    function init() {
    
      google.earth.createInstance('map3d', initCallback, failureCallback);
    }
    
    function initCallback(pluginInstance) {
      ge = pluginInstance;
      ge.getWindow().setVisibility(true);
      // add a navigation control
      ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO);  
      
    la = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
    var win = ge.getWindow();
    window.google.earth.addEventListener(win, 'mousedown',stopFly);
    }
    
    function failureCallback(errorCode) {
    }


	function show(){
	var href="<%=basePath%>fileupload/here.kml";
	var link = ge.createLink('');
 var networkLink = ge.createNetworkLink('');
 link.setHref(href);
	networkLink.set(link, true, true); // Sets the link, refreshVisibility, and flyToView
	ge.getFeatures().appendChild(networkLink);

    ge.getLayerRoot().enableLayerById(ge.LAYER_BUILDINGS,true);
    ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS,true);
    ge.getLayerRoot().enableLayerById(ge.LAYER_TERRAIN,true);
    
    
    
    za(29.55074547500864,106.5613067499591,-13.45457674430027,146.587858343265,38.7936135189649,83.7414);
    
    
  }
function toggleBuildings(){
  if (!buildings)
  {
  buildings = true;
  //toggleVisibilityNLs(false);
  ge.getLayerRoot().enableLayerById(ge.LAYER_BUILDINGS, buildings);

  }
  else
  {
  buildings = false;
  toggleVisibilityNLs(true);
  ge.getLayerRoot().enableLayerById(ge.LAYER_BUILDINGS, buildings);
  }
  }
  function buttonClick(lat,lng,head,range,altitude,tilt) {
    za(lat,lng,head,range,altitude,tilt);
  }
  
  function za(lat,lng,head,range,altitude,tilt){
 
    turning = false;
    latitude = lat;
    longitude = lng;
    heading = head;
     alert(0);
    la.set(lat,lng,0,ge.ALTITUDE_RELATIVE_TO_GROUND,heading,tilt,range);
    
    if (!frameendEL){
    
    toggleFrameendEL();
    }
      
    ge.getOptions().setFlyToSpeed(.25);
    ge.getView().setAbstractView(la);
    turning = false;
    
    }
    function toggleFrameendEL(){
  
  if (!frameendEL){
  window.google.earth.addEventListener(ge, 'frameend', zoomAround);
  frameendEL = true;
  }else{
  google.earth.removeEventListener(ge, 'frameend', zoomAround);
  frameendEL = false;
  }
  
  }
  
  
    function zoomAround(){
              
    latemp = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
    
    if ((latemp.getLatitude().toFixed(4) == latitude.toFixed(4) && latemp.getLongitude().toFixed(4) == longitude.toFixed(4))|turning){
    turn();
    turning = true;
   
    }

  }
  function turn(){
   ge.getOptions().setFlyToSpeed(500);
    heading+=.5;
    if (heading > 360){
    heading -= 360;}   

    la.setHeading(heading);
    la.setLatitude(latitude);
    la.setLongitude(longitude);
    ge.getView().setAbstractView(la);    
  }
  function goto(){
  
  	var href="<%=basePath%>fileupload/doc.kml";
	var link = ge.createLink('');
 var networkLink = ge.createNetworkLink('');
 link.setHref(href);
	networkLink.set(link, true, true); // Sets the link, refreshVisibility, and flyToView
	ge.getFeatures().appendChild(networkLink);

    ge.getLayerRoot().enableLayerById(ge.LAYER_BUILDINGS,true);
    ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS,true);
    ge.getLayerRoot().enableLayerById(ge.LAYER_TERRAIN,true);
    
    
    za(37.9739825760349,-87.5723339875666,101.349,146.587858343265,38.7936135189649,83.7414);
    
    
  }
  
   function stopFly() {
    if(frameendEL){
      toggleFrameendEL();
    }
    ge.getOptions().setFlyToSpeed(1);
    turning = false;
  }
    </script>
    </head>
    <body onload="init();">
        <div id="html">
            <%@include file="/WEB-INF/jspf/header.jspf" %>
            <div id="newHouse">
                <div class="left">
                    <ul class="nav">
                        <li class="on">内容</li>
                        <li>搜索</li>
                    </ul>
                    <div class="text">
                        <p class="t2 floor"><a href="storeyList.jsp">选择楼层</a></p>
                        <p class="t1">名称</p>
                        <p class="t2">国际社区</p>
                        <p class="t1">楼盘四周</p>
                        <p class="t2">东：腾龙大道；南：规划道路；西：南滨路；北：龙湖·丽江</p>
                        <p class="t1">业务类型</p>
                        <p class="t2">普通住宅</p>
                        <p class="t1">最早开盘日期</p>
                        <p class="t2">2008年11月2日</p>
                        <p class="t1">物业管理</p>
                        <p class="t2">重庆中海物业管理有限公司</p>
                        <p class="t1">物业管理费</p>
                        <p class="t2">1.50-1.80元/平米/月</p>
                        <p class="t1">名称</p>
                        <p class="t2">国际社区</p>
                        <p class="t1">楼盘四周</p>
                        <p class="t2">东：腾龙大道；南：规划道路；西：南滨路；北：龙湖·丽江</p>
                        <p class="t1">业务类型</p>
                        <p class="t2">普通住宅</p>
                        <p class="t1">最早开盘日期</p>
                        <p class="t2">2008年11月2日</p>
                        <p class="t1">物业管理</p>
                        <p class="t2">重庆中海物业管理有限公司</p>
                        <p class="t1">物业管理费</p>
                        <p class="t2">1.50-1.80元/平米/月</p>
                        <p class="t1">名称</p>
                        <p class="t2">国际社区</p>
                        <p class="t1">楼盘四周</p>
                        <p class="t2">东：腾龙大道；南：规划道路；西：南滨路；北：龙湖·丽江</p>
                        <p class="t1">业务类型</p>
                        <p class="t2">普通住宅</p>
                        <p class="t1">最早开盘日期</p>
                        <p class="t2">2008年11月2日</p>
                        <p class="t1">物业管理</p>
                        <p class="t2">重庆中海物业管理有限公司</p>
                        <p class="t1">物业管理费</p>
                        <p class="t2">1.50-1.80元/平米/月</p>
                    </div>
                </div>
                <div class="right">
                    <div class="map" id="map3d">
                   
					 </div>
                    <form class="seek">
                        <input class="input"/>
                        <select name="select"><option>城市</option></select>
                        <select name="select"><option>物业类型</option></select>
                        <select name="select"><option>价格范围</option></select>
                        <select name="select"><option>套内面积</option></select>
                        <input class="button" type="submit" value="搜索" />
                    </form>
                    <table>
                        <thead>
                            <tr class="s2">
                                <td class="td1">项目名</td>
                                <td class="td2">房地产开发商</td>
                                <td class="td3">物业类型</td>
                                <td class="td4">区域</td>
                                <td class="td5">在售单价区间</td>
                                <td class="td6">当期规划户数</td>
                                <td class="td7">当期建筑面积</td>
                                <td class="td8 last">销售电话</td>
                            </tr>
                        </thead>
                        <tbody>
                        <tr class="s1" onclick="show();">
                            <td>中海国际社区</td>
                            <td>重庆嘉江房地产开发</td>
                            <td>综合</td>
                            <td>南岸区弹子石组团C组</td>
                            <td>5800-5800元/平米</td>
                            <td>1,327户</td>
                            <td>2,300,000平米</td>
                            <td class="last">67633888</td>
                        </tr>
                        <tr class="s2" onclick="goto();">
                            <td>恒大名都</td>
                            <td>恒大地产集团重庆有限公司</td>
                            <td>综合</td>
                            <td>石油路1号2号楼</td>
                            <td>7500-7500元/平米</td>
                            <td>3,603户</td>
                            <td>670,000平米</td>
                            <td class="last">68588666</td>
                        </tr>
                        <tr class="s1">
                            <td>中海国际社区</td>
                            <td>重庆嘉江房地产开发</td>
                            <td>综合</td>
                            <td>南岸区弹子石组团C组</td>
                            <td>5800-5800元/平米</td>
                            <td>1,327户</td>
                            <td>2,300,000平米</td>
                            <td class="last">67633888</td>
                        </tr>
                        <tr class="s2">
                            <td>恒大名都</td>
                            <td>恒大地产集团重庆有限公司</td>
                            <td>综合</td>
                            <td>石油路1号2号楼</td>
                            <td>7500-7500元/平米</td>
                            <td>3,603户</td>
                            <td>670,000平米</td>
                            <td class="last">68588666</td>
                        </tr>
                        <tr class="s1">
                            <td>中海国际社区</td>
                            <td>重庆嘉江房地产开发</td>
                            <td>综合</td>
                            <td>南岸区弹子石组团C组</td>
                            <td>5800-5800元/平米</td>
                            <td>1,327户</td>
                            <td>2,300,000平米</td>
                            <td class="last">67633888</td>
                        </tr>
                        <tr class="s2">
                            <td>恒大名都</td>
                            <td>恒大地产集团重庆有限公司</td>
                            <td>综合</td>
                            <td>石油路1号2号楼</td>
                            <td>7500-7500元/平米</td>
                            <td>3,603户</td>
                            <td>670,000平米</td>
                            <td class="last">68588666</td>
                        </tr>
                        <tr class="s1">
                            <td>中海国际社区</td>
                            <td>重庆嘉江房地产开发</td>
                            <td>综合</td>
                            <td>南岸区弹子石组团C组</td>
                            <td>5800-5800元/平米</td>
                            <td>1,327户</td>
                            <td>2,300,000平米</td>
                            <td class="last">67633888</td>
                        </tr>
                        <tr class="s2">
                            <td>恒大名都</td>
                            <td>恒大地产集团重庆有限公司</td>
                            <td>综合</td>
                            <td>石油路1号2号楼</td>
                            <td>7500-7500元/平米</td>
                            <td>3,603户</td>
                            <td>670,000平米</td>
                            <td class="last">68588666</td>
                        </tr>
                        <tr class="s1">
                            <td>中海国际社区</td>
                            <td>重庆嘉江房地产开发</td>
                            <td>综合</td>
                            <td>南岸区弹子石组团C组</td>
                            <td>5800-5800元/平米</td>
                            <td>1,327户</td>
                            <td>2,300,000平米</td>
                            <td class="last">67633888</td>
                        </tr>
                        <tr class="s2">
                            <td>恒大名都</td>
                            <td>恒大地产集团重庆有限公司</td>
                            <td>综合</td>
                            <td>石油路1号2号楼</td>
                            <td>7500-7500元/平米</td>
                            <td>3,603户</td>
                            <td>670,000平米</td>
                            <td class="last">68588666</td>
                        </tr>
                        <tr class="s1">
                            <td>中海国际社区</td>
                            <td>重庆嘉江房地产开发</td>
                            <td>综合</td>
                            <td>南岸区弹子石组团C组</td>
                            <td>5800-5800元/平米</td>
                            <td>1,327户</td>
                            <td>2,300,000平米</td>
                            <td class="last">67633888</td>
                        </tr>
                        <tr class="s2">
                            <td>恒大名都</td>
                            <td>恒大地产集团重庆有限公司</td>
                            <td>综合</td>
                            <td>石油路1号2号楼</td>
                            <td>7500-7500元/平米</td>
                            <td>3,603户</td>
                            <td>670,000平米</td>
                            <td class="last">68588666</td>
                        </tr>
                        <tr class="s1">
                            <td>中海国际社区</td>
                            <td>重庆嘉江房地产开发</td>
                            <td>综合</td>
                            <td>南岸区弹子石组团C组</td>
                            <td>5800-5800元/平米</td>
                            <td>1,327户</td>
                            <td>2,300,000平米</td>
                            <td class="last">67633888</td>
                        </tr>
                        <tr class="s2">
                            <td>恒大名都</td>
                            <td>恒大地产集团重庆有限公司</td>
                            <td>综合</td>
                            <td>石油路1号2号楼</td>
                            <td>7500-7500元/平米</td>
                            <td>3,603户</td>
                            <td>670,000平米</td>
                            <td class="last">68588666</td>
                        </tr>
                        <tr class="s1">
                            <td>中海国际社区</td>
                            <td>重庆嘉江房地产开发</td>
                            <td>综合</td>
                            <td>南岸区弹子石组团C组</td>
                            <td>5800-5800元/平米</td>
                            <td>1,327户</td>
                            <td>2,300,000平米</td>
                            <td class="last">67633888</td>
                        </tr>
                        <tr class="s2">
                            <td>恒大名都</td>
                            <td>恒大地产集团重庆有限公司</td>
                            <td>综合</td>
                            <td>石油路1号2号楼</td>
                            <td>7500-7500元/平米</td>
                            <td>3,603户</td>
                            <td>670,000平米</td>
                            <td class="last">68588666</td>
                        </tr>
                    </tbody>
                    <tfoot>
                        <tr><td colspan="8">首页 上一页 1 2 3 4 5 6 7 8 9 ... 下一页</td></tr>
                    </tfoot>
                    </table>
                </div>
                <br class="clear"/>
            </div>
            <%@include file="/WEB-INF/jspf/footer.jspf" %>
        </div>
    </body>
</html>
